package com.hm.demo1;

import java.io.Serializable;

public class Hero implements Serializable {
    private String name;
    private int survival;
    private int attack;
    private int effect;

    public Hero(String name, int survival, int attack, int effect) {
        this.name = name;
        this.survival = survival;
        this.attack = attack;
        this.effect = effect;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSurvival() {
        return survival;
    }

    public void setSurvival(int survival) {
        this.survival = survival;
    }

    public int getAttack() {
        return attack;
    }

    public void setAttack(int attack) {
        this.attack = attack;
    }

    public int getEffect() {
        return effect;
    }

    public void setEffect(int effect) {
        this.effect = effect;
    }

    @Override
    public String toString() {
        return "Hero{" +
                "name='" + name + '\'' +
                ", survival=" + survival +
                ", attack=" + attack +
                ", effect=" + effect +
                '}';
    }
}
